package com.lzh.others.designmode.strategymod;

/**
 * @Description:
 *
 * @Author: LiuZiHao
 * @Date: 2022/11/7 11:31
 */
public class StrategyPatternDemo {
    public static void main(String[] args) {
        Context context = new Context(new OperationAdd());
        System.out.println("5+2 = " + context.getResult(5, 2));

        context = new Context(new OperationMinus());
        System.out.println("5-2 = " + context.getResult(5, 2));
    }
}
